<template>
	<view>
		<view class="success">
			<image src="/static/success.png" alt=""></image>
			<view class="title">支付完成</view>
			<view class="btnBox">
				<view style="padding-right: 20rpx;">
					<u-button type="primary" :plain="true" @click="goback" :hairline="true" :text="isPay?'返回商户':'返回首页'"></u-button>
				</view>
				<view style="padding-left: 20rpx;">
					<u-button type="success" :plain="true" :hairline="true" text="再来一单"></u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(opt) {
			if(opt.pay=="pay"){
				this.isPay = true
			}
		},
		mounted() {},
		data() {
			return {
				isPay:false,
			};
		},
		methods: {
			navBack() {
				uni.navigateBack()
			},
			goback(){
				uni.switchTab({
					url:'/pages/index/index'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.success {
		padding-top: 240rpx;
		// margin-bottom: 120rpx;
		text-align: center;

		image {
			width: 160rpx;
			height: 160rpx;
			margin-bottom: 40rpx;
		}

		.title {
			font-weight: 600;
			font-size: 40rpx;
			padding-top: 20rpx;
		}

		.btnBox {
			width: 100%;
			padding: 40rpx 0;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>